import * as type from './mutations-type'
import Vue from 'vue'
export default {
    [type.ALL_MENU](state, item) {
        state.allMenuConfig = item;
    },
    [type.MENU_ITEM](state, item) {
        // console.log(item)
        state.menuItem = item;
    },
    [type.NAV_ITEM](state, item) {
        // console.log(item)
        state.navItem = item;
    },
    [type.ALL_DEPATEMENT](state, item) {
        state.depateMent = item;
    },
    [type.ROLES_LIST](state, item) {
        state.rolesList = item;
    },
    [type.ANGENT_LISTS](state, item) {
        state.angentList = item;
    },
    [type.ANGENT_CODE](state, items) {
        //经纪商过滤器
        // Vue.filter('filterAgent', (code) => {
        //     let name = '';
        //     if(code==''){
        //       return '所有';
        //     }
        //     for (let item of items) {
        //         if (item.key == code) {
        //             name = item.name;
        //         }
        //     }
        //     return name;
        // })

         state.agentCodeName=items;
    }
}